home *** CD-ROM | disk | FTP | other *** search
- ;**********************************************************
- ;
- ; Installation script for Misc v1.0
- ; v0.95
- ;
- ;**********************************************************
-
- ;************
- ; PROCEDURES
- ;************
-
- (procedure P_choosestuff
- (select @user-level
- ( ; This is the NOVICE-mode part
- (set @default-dest "SYS:Utilities")
- (set #docdir "HELP:ENGLISH")
- (set #copygadget "to: `sys:classes/gadgets'")
- (set #icontype "MagicWB")
- (set #putadditional "won't")
- )
-
- ( ; This is the ADVANCED-mode part
- (set @default-dest
- (askdir
- (prompt (cat "Choose directory where you would like to place the Misc-executable.\n"
- "»»» A directory named `Misc' will be created! «««"))
- (help @askdir-help)
- (default @default-dest)
- )
- )
- (set #icons
- (askchoice
- (prompt "What type of Icons would you like to have installed?")
- (help (cat "You should choose what type of Icons you would like to have installed for your programs."
- "The choices are:\n\n"
- "MagicWB - Default. Icons using the MagicWB-standard by Martin Huttenloher.\n\n"
- "Smallbench - MagicWB-style icons for screenmodes with a pixel aspect ratio of 1:2,"
- "e.g. High Res NoLace. By Tom Oszczepalski & Paul Henrik.\n\n"
- "Normal Workbench icons - These are the standard AmigaOS2-look icons. They suck!\n\n"
- "If you don't know what to choose, pick MagicWB!"))
- (choices "MagicWB" "Smallbench (NoLace)" "Normal Workbench icons")
- )
- )
- (select #icons
- (set #icontype "MagicWB")
- (set #icontype "Smallbench")
- (set #icontype "Normal")
- )
- (set #putadditional "will")
- (set #copygadget "to: `sys:classes/gadgets'")
- )
-
- ( ; This is the EXPERT-mode part
- (set @default-dest
- (askdir
- (prompt (cat "Choose directory where you would like to place the Misc-executable.\n"
- "»»» The Installer will NOT create a directory. «««"))
- (help @askdir-help)
- (default @default-dest)
- )
- )
- (set #docdir
- (askdir
- (prompt (cat "Choose directory where you would like to place the Misc documentation\n"
- "»»» Again, no directory will be created! «««"))
- (help (cat "This could be a place where you generally store program documentations,"
- "or it could be the directory of Misc itself.\n\n"
- @askdir-help))
- (default @default-dest)
- )
- )
- (if
- (askbool
- (prompt (cat "Misc requires Textfield.gadget to run, it must be installed in the"
- "`sys:classes/gadgets' - drawer.\n"
- "If there's a newer version already installed, it won't be overwritten.\n\n"
- "Is this OK?"))
- (help (cat "Misc uses Textfield.gadget for editing files in."
- "The Textfield.gadget is included in the package and it can be installed for you now.\n"
- "The version to be installed is version 3.1,"
- "if there is a newer version it won't be overwritten.\n"
- "For information on how to use the Textfield.gadget, please read the documentation!\n\n"
- "It will be installed in `sys:classes/gadgets'."))
- (default 1)
- )
- (set #copygadget "to: `sys:classes/gadgets'")
- (set #copygadget "won't be installed.")
- )
- (set #icons
- (askchoice
- (prompt "What type of Icons would you like to have installed?")
- (help (cat "You should choose what type of Icons you would like to have installed for your programs."
- "The choices are:\n\n"
- "MagicWB - Default. Icons using the MagicWB-standard by Martin Huttenloher.\n\n"
- "Smallbench - MagicWB-style icons for screenmodes with a pixel aspect ratio of 1:2,"
- "e.g. High Res NoLace. By Tom Oszczepalski & Paul Henrik.\n\n"
- "Normal Workbench icons - These are the standard AmigaOS2-look icons. They suck!"))
- (choices "MagicWB" "Smallbench (NoLace)" "Normal Workbench icons")
- )
- )
- (select #icons
- (set #icontype "MagicWB")
- (set #icontype "Smallbench")
- (set #icontype "Normal")
- )
- (set #putadditional
- (askbool
- (prompt (cat "Would you like to have the Additional Icons installed?\n"
- "These are icons for different ToolManager docks and an Imagedrawer.\n"
- "They will be put in a drawer called `MiscIcons'"))
- (help (cat "Here you can choose whether you would like to install some additional icons to"
- "the ones necessary to run Misc. They are different ToolManager dockicons"
- "(MagicWB, TMTM (TinyMiniToolManager), KMI...). Plus an Imagedrawer in case you"
- "would like to have Misc in an own drawer."))
- )
- )
- (if (= #putadditional 1)
- (
- (set #iconsdir
- (askdir
- (prompt (cat "Choose directory where you would like to install the additional Icons."
- "A drawer called `MiscIcons' will be created."))
- (help @askdir-help)
- (default @default-dest)
- )
- )
- (set #putadditional "will")
- )
- (
- (set #putadditional "won't")
- (set #iconsdir "any place")
- )
- )
- )
- )
- )
-
- ;********
- ; MAIN
- ;********
-
- ; *****************************
- ; Check for correct OS (2.0+)
- ; *****************************
-
- (if (< (/ (getversion) 65536) 37)
- (abort
- "Misc requires at least AmigaOS v2.0."
- )
- )
-
- ; *****************************
- ; Choose where&what to install
- ; *****************************
-
- (set @default-dest "SYS:Utilities")
-
- (P_choosestuff)
-
- (if (= @user-level 1)
- (
- (set @default-dest (tackon @default-dest "Misc"))
- (set #docdir @default-dest)
- (set #iconsdir @default-dest)
- )
- )
-
- (if (> @user-level 0)
- (until
- (askbool
- (prompt (cat "These files will now be copied:\n\n"
- ("The Misc executable to: `%s'\nThe Misc documentation to: `%s'\n" @default-dest #docdir)
- ("The Textfield.gadget %s\n\nYou have chosen the %s icontype, " #copygadget #icontype)
- ("and the additional icons %s be copied to %s.\n\n" #putadditional #iconsdir)
- "Is this OK?"))
- (help (cat "If you click on \"Copy Files\", the files will be copied into the directories of your choice.\n"
- "And if you click on \"Choose again\", you can correct possible mistakes."))
- (choices "Copy Files" "Choose again")
- )
- (P_choosestuff)
- )
- )
-
- (copyfiles
- (prompt "The executable")
- (source "Misc")
- (dest @default-dest)
- )
- (copyfiles
- (prompt "The executable icon")
- (source ("Icons/%s/Misc.info" #icontype))
- (dest @default-dest)
- )
- (copyfiles
- (prompt "The documentation")
- (source "Misc.guide")
- (dest #docdir)
- )
- (copyfiles
- (prompt "The Documentation icon")
- (source ("Icons/%s/Misc.guide.info" #icontype))
- (dest @default-dest)
- )
- (if (= #copygadget "to: `sys:classes/gadgets'")
- (
- (copylib
- (prompt "Textfield.gadget")
- (source "Textfield.gadget")
- (dest "SYS:classes/gadgets")
- )
- )
- )
- (if (= #putadditional "will")
- (copyfiles
- (prompt "Additional Icons")
- (source "Icons/Additional")
- (dest (tackon #iconsdir "MiscIcons"))
- (all)
- )
- )
- (select @user-level
- (exit (cat "Installation complete!\n"
- "Misc can be found in your `SYS:Utilities' - drawer.\n"
- "The documentation can be found in your `HELP:ENGLISH' - drawer.\n\n"
- "Have fun using Misc!")
- (quiet)
- )
-
- (exit (cat "Installation complete!\n"
- ("The Misc installation can be found in your `%s' - drawer.\n\n" @default-dest)
- "Have fun using Misc!")
- (quiet)
- )
-
- (exit (cat "Installation complete!\n"
- ("The executable can be found in your `%s' - drawer.\n" @default-dest)
- ("The documentation can be found in your `%s' - drawer.\n" #docdir)
- ("The additional icons can be found in your `%s' - drawer.\n\n" #iconsdir)
- "Have fun using Misc!")
- (quiet)
- )
- )
-